<?php

        $connection = mysql_connect("localhost","root","");
        mysql_select_db("mobile_event", $connection);
        // Note: You need to verify the data coming in isn't harmful, this SQL pretty much puts anything into the database so make sure to change this!
        $email = mysql_real_escape_string($_POST['email']);
        $pass = mysql_real_escape_string($_POST['pass']);
		
		$pass = md5 ($pass);
		
        $sql = mysql_query("SELECT e_mail, pass_wd FROM u_ser WHERE e_mail = '$email' AND pass_wd = '$pass_wd'") or die (mysql_error());
        
		if (mysql_num_row($sql) == 1 {
			$_SESSION ['authorized'] = true;
		}
    
?>